package com.drink.yan.intf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.meta.framework.copy.Copyable;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.List;

/**
 * java类简单作用描述
 *
 * @Title:
 * @Package: com.drink.yan.intf.entity.
 * @Author: M.simple
 * @Remark: The modified content
 * @CreateDate: 2023/11/24 20:39
 * @Version: v2.0
 */
@Data
@TableName(value = "yan_task", autoResultMap = true)
public class YanTask extends Copyable {

    @TableId(value = "task_no", type = IdType.AUTO)
    private Long taskNo;
    @ApiModelProperty("任务类型")
    private String taskType;
    @ApiModelProperty("任务分类, global,private")
    private String taskCate;
    @ApiModelProperty("任务名称")
    private String taskName;
    @ApiModelProperty("任务状态,未开始，进行中，已结束")
    private String taskStatus;
    @ApiModelProperty("任务内容")
    private String taskContent;

    @ApiModelProperty("作用域类型：all,school_area,agency")
    private String scopeType;

    @TableField(value = "scope_value", typeHandler = FastjsonTypeHandler.class)
    private List<Long> scopeValue;

    @ApiModelProperty("图片")
    @TableField(value = "task_images", typeHandler = FastjsonTypeHandler.class)
    private List<String> taskImages;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @ApiModelProperty("任务开始时间")
    private LocalDateTime beginTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @ApiModelProperty("任务结束时间")
    private LocalDateTime endTime;

    @ApiModelProperty("价格")
    private BigDecimal taskPrice;
    private String delFlag;
    private Long createBy;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime createTime;
    private Long updateBy;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime updateTime;
    private String remark;
}
